package com.lovo.sys.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDate;

@Getter
@Setter
@NoArgsConstructor
@TableName("user_order")
@ApiModel(value = "用户订单实体", description = "用户订单实体")
public class UserOrderBean {
    @TableId(value = "pk_orderId", type = IdType.AUTO)
    @ApiModelProperty(value = "用户订单")
    public long orderId;

    @TableField("uo_type")
    @ApiModelProperty(value = "商品类型")
    private String type;

    @TableField("uo_goodsName")
    @ApiModelProperty(value = "商品名")
    private String goodsName;

    @TableField("uo_specs")
    @ApiModelProperty(value = "商品规格")
    private String specs;

    @TableField("uo_goodsNum")
    @ApiModelProperty(value = "商品数量")
    private int goodsNum;

    @TableField("uo_date")
    @ApiModelProperty(value = "下单时间")
    private LocalDate date = LocalDate.now();

    @TableField("uo_goodsPrice")
    @ApiModelProperty(value = "商品价格")
    private float goodsPrice;

    @TableField("uo_totalPrice")
    @ApiModelProperty(value = "商品总价")
    private float totalPrice;

    @TableField("uo_buyPrice")
    @ApiModelProperty(value = "实付价")
    private float buyPrice;

    @TableField("uo_status")
    @ApiModelProperty(value = "0-未付款，1--未发货，2--已发货，3--已完成，4--退款中，5--已退货，6--已退款")
    private int status;

    @TableField("uo_payDate")
    @ApiModelProperty(value = "付款时间")
    private LocalDate payDate;

    @TableField("uo_userName")
    @ApiModelProperty(value = "用户名")
    private String userName;

    @TableField("uo_delete")
    @ApiModelProperty(value = "是否删除 0-未删除 1-已删除")
    private int isDelete;

    @TableField("uo_address")
    @ApiModelProperty(value = "收获地址")
    private String userAddress;

    @TableField("uo_orderNum")
    @ApiModelProperty(value = "订单编号")
    private String orderNum;
    @TableField("uo_userPhone")
    @ApiModelProperty(value = "电话")
    private String userPhone;
    @TableField("uo_payType")
    @ApiModelProperty("支付方式") // 0-预存款  1-支付宝
    private int payType;
    @TableField(exist = false)
    @ApiModelProperty("退货详情实体")
    private BackInfoBean backInfoBean;

    @TableField("uo_buyerName")
    @ApiModelProperty("购买人")
    private String buyerName;


}
